import Vue from 'vue'

import App from './App.vue'
import router from './router'
import store from './store'
import "./plugins/antd.js";
import "./plugins/bmap.js";
import "./plugins/echarts.js";
import './permission' // permission control
import 'ant-design-vue/dist/antd.less';
import './global.less' // global style

import Editor from 'vue2-ace-editor';
import { download } from '@/utils/request'

import { hasBtnPermission } from './utils/permission'
import * as filters from './filters' // 全局筛选器
Vue.use(Editor)

// 注册全局实用程序筛选器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
Vue.config.productionTip = false
Vue.prototype.hasPerm = hasBtnPermission
Vue.prototype.download = download

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
